import React from 'react'

export default function index(props) {
  // console.log(props, '更新');
  const { id, name, done } = props

console.log(done,"done");
  const changgedata = (e) => {
    props.changes(id, e.target.checked)
  }
  const dlet = (id) => {
    console.log('item',id,props.delettodoss);
    props.delettodoss(id)
  }
  return (
    <div>
      <div> <input type="checkbox" onChange={changgedata} name="" id="" checked={done} />{name} <button onClick={() => { dlet(id) }} >删除</button></div>
    </div>
  )
}
